<?php

/**
 *      [品牌空间] (C)2001-2010 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: menu.inc.php 5759 2011-10-28 08:32:24Z menglingmin $
 */

if(!defined('IN_ADMIN') && !defined('IN_STORE')) {
	exit('Access Denied');
}

//二级菜单

if(pkperm('isadmin')) {
	require_once(B_ROOT.'./source/admininc/perm.inc.php');
	$menu['paneladd'] = array();
	foreach($menu['infomanage'] as $marr) {
		$addarr[$marr[0]] = $marr;
	}
	foreach(array('good', 'notice', 'album', 'consume', 'groupbuy', 'brandlinks') as $vtype) {
		if(!empty($addarr['menu_'.$vtype])) {
			if($vtype == 'brandlinks') {
				$menu['paneladd'][] = array('menu_list_add'.$vtype, 'add&m='.$vtype.'&op=add');
			} else {
				$menu['paneladd'][] = array('menu_list_add'.$vtype, 'add&m='.$vtype);
			}
		}
	}
	foreach($menu as $key=>$menus) {
		showmenu($key, $menus);
	}
} else {
	if($shop->status == 'new') {
		showmenu('index', array(array('menu_home', 'index')));
		$shopmenu = array(
			array('menu_shop_my', 'edit&m=shop')
		);
		if($_G['setting']['enablemap'] == 1) {
			array_push($shopmenu, array('menu_map', 'map'));
		}
		showmenu('shop', $shopmenu);
	}elseif($shop->status == 'normal') {
		$shopmenu = array(
			array('menu_shop_my', 'edit&m=shop'),
			array('menu_theme', 'theme'),
			array('menu_modifypasswd', 'modifypasswd'),
			array('menu_nav','nav')
		);
		if($_G['setting']['enablemap'] == 1) {
			array_push($shopmenu, array('menu_map', 'map'));
		}
		showmenu('index', $menuindex);
		showmenu('shop', $shopmenu);
		showmenu('infomanage', $menuinfomanage);
	}
}

?>
